package mypackage1;

public class Animal {
    private String  name;
   protected int age;
    protected float weight;
    public int legs;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    private void breathe(){
        System.out.println("动物呼吸。。。。。");
    }

    protected void eat(){
        System.out.println("不同动物喜好的食物各不相同");
    }

    public void sleep(){
        System.out.println("动物睡觉。。。。");
    }
}
